package com.zkthink.ceres.shoppingcart.service;

import com.zkthink.base.R;
import com.zkthink.base.service.SuperService;
import com.zkthink.ceres.product.vo.ShoppingCartSkuVO;
import com.zkthink.ceres.shoppingcart.entity.ShoppingCart;

import java.util.List;

/**
 * <p>
 * 业务接口
 * 购物车表
 * </p>
 *
 * @author vivi.huang
 * @date 2020-05-18
 */
public interface ShoppingCartService extends SuperService<ShoppingCart> {

    /**
     * 添加购物车
     * @param memberId
     * @param shoppingCartSkuVO
     * @return
     */
    R<List<ShoppingCartSkuVO>> saveShoppingCart(Long memberId, ShoppingCartSkuVO shoppingCartSkuVO);

    /**
     * 更新购物车
     * @param memberId
     * @param shoppingCartSkuVOList
     * @return
     */
    R<List<ShoppingCartSkuVO>> updateShoppingCart(Long memberId, List<ShoppingCartSkuVO> shoppingCartSkuVOList);

    /**
     * 获取购物车
     * @param memberId
     * @return
     */
    R<List<ShoppingCartSkuVO>> getShoppingCart(Long memberId);

    /**
     * 清空购物车
     * @param memberId
     * @return
     */
    R<Boolean> deleteShoppingCart(Long memberId);

    /**
     * 根据skuid list  清空部分购物车
     * @param memberId
     * @param skuIdList
     * @return
     */
    R<Boolean> deletePartOfSkuFromShoppingCart(Long memberId, List<Long> skuIdList);
}
